package com.qhit.service.impl;

import com.qhit.dao.UserMapper;
import com.qhit.pojo.User;
import com.qhit.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    public List<User> getList(HashMap hashMap) {
        return userMapper.getList(hashMap);
    }

    public long getListCount(HashMap hashMap) {
        return userMapper.getListCount(hashMap);
    }

    public int add(User user) {
        return userMapper.add(user);
    }

    public User getUserById(String id) {
        return userMapper.getUserById(id);

    }

    public int edit(User user) {

        return userMapper.edit(user);
    }

    public int del(String id) {
        return userMapper.del(id);
    }

    public User getUserByUserName(String username) {
        return userMapper.getUserByUserName(username);
    }
}
